package net.yambal.RTM.Utilty
{
	public class RTMBooleanUtil
	{
		public function RTMBooleanUtil()
		{
		}
		
		public static function toBoolean(o:String):Boolean{
			switch (o){
				case "true":
					return true;
					break;
				case "1":
					return true;
					break;
				case "y":
					return true;
					break;
				case "Y":
					return true;
					break;
				default:
					return false;
			}
		}
		
		public static function toRTMBoolean(b:Boolean):String{
			if(b){
				return "1";
			}
			return "0";
		}

	}
}